/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pgentity.services;

import db.DBContext;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import pgentity.events.release_event.ReleaseEventServices;
import pgentity.pool.EntityPool;
import pgentity.services.UserServices;

/**
 *
 * @author Salm
 */
public class GameServices {
    public static final ScheduledExecutorService SCHEDULER =
            Executors.newScheduledThreadPool(3);
    
    private GameServices() {}
    
    public static void beforeGameStart()
    {
        final long now = System.currentTimeMillis();
        
        try
        {
            System.out.println("Before game start: " + Thread.currentThread());
            DBContext.SQL().run();
            ReleaseEventServices.init();
            UserServices.checkMakeNPC(now);
        }
        finally
        {
//            EntityPool.inst().releaseAllThreadResources();
        }
    }
}
